'use strict';

var mongoose = require('./features/core/server/config/mongoose');
var config = require('./features/core/server/config/config');
var express = require('./features/core/server/config/express');
var passport = require('./features/core/server/config/passport');


//Create mongoose connection
mongoose(function (db) {
    //Create express instance
    var app = require('express')();

    //Configure the passport middleware
    //var passport = passport();

    var port = config.server.port;

    app = express(app);

    app.listen(port, function(){
        console.log('Server start at ' + new Date() + '. Listening on ' + port);
    });
});

